Change 2FA Field Type From Password to Text#13671
Conversation
Pulling upstream.
There was a problem hiding this comment.
Pull request overview
This PR updates the CloudStack Management UI’s 2FA code inputs to use a plain text input instead of a password input, addressing password-manager behavior where OTP/static-pin fields may be treated like real password fields (Issue #13337).
Changes:
- Replaced
<a-input-password>with<a-input>for 2FA code entry in login/setup/verify flows. - Keeps existing form bindings and submission behavior while changing the rendered input type/behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| ui/src/views/iam/SetupTwoFaAtUserProfile.vue | Switches the 2FA code field from password input to standard input in the user-profile 2FA setup flow. |
| ui/src/views/dashboard/VerifyTwoFa.vue | Switches the 2FA verification code field from password input to standard input in the login verification step. |
| ui/src/views/dashboard/SetupTwoFaAtLogin.vue | Switches the 2FA code field from password input to standard input in the login-time 2FA setup flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
ui/src/views/dashboard/VerifyTwoFa.vue:41
- After replacing
<a-input-password>with<a-input>, thefocusInput()method still queriesinput[type=password], so the OTP field will no longer be auto-focused on mount. Update the selector to target the new input (e.g., query forinputorinput[type=text]) or use a dedicated ref for the<a-input>element.
<a-form-item name="code" ref="code" style="text-align: center;">
<a-input
style="width: 500px"
v-model:value="form.code"
autocomplete="one-time-code"
inputmode="numeric"
placeholder="xxxxxx" />
|
@daviftorres code looks good to me, it seems to be applicable to earlier versions as well, so if interested you could rebase it on older LTS branches (4.20 or 4.22). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13671 +/- ##
============================================
- Coverage 19.64% 19.64% -0.01%
+ Complexity 19796 19793 -3
============================================
Files 6368 6368
Lines 575119 575119
Branches 70382 70382
============================================
- Hits 112994 112980 -14
- Misses 449839 449853 +14
Partials 12286 12286
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
This PR suggest changes to #13337.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?
Note: I am not a developer, so please do the appropriated tests to validate what I propose. It is at the best of my intentions and limited by my competences.